package kr.co.medical.dao;

import java.sql.SQLException;
import java.util.List;

import org.springframework.web.servlet.ModelAndView;

import kr.co.medical.dto.CalBean;
import kr.co.medical.dto.Calendar;
import kr.co.medical.dto.CheobangTempInsert;
import kr.co.medical.dto.Cheobang_All;
import kr.co.medical.dto.Cheobang_waiting_list;
import kr.co.medical.dto.Disease;
import kr.co.medical.dto.DiseaseInfo;
import kr.co.medical.dto.Doctor;
import kr.co.medical.dto.DoctorMajor;
import kr.co.medical.dto.Doctormainview;
import kr.co.medical.dto.Dose;
import kr.co.medical.dto.Fee;
import kr.co.medical.dto.Filesview;
import kr.co.medical.dto.Geomsa_code;
import kr.co.medical.dto.Jindanseo;
import kr.co.medical.dto.Medicine;
import kr.co.medical.dto.Seosik;
import kr.co.medical.dto.Soonap;
import kr.co.medical.dto.Testmove;
import kr.co.medical.dto.Wardlist;

public interface DoctorDao {

	/* 인터넷 예약 start */

	public List<Doctor> doctorProfile(String dept_id)
			throws ClassNotFoundException, SQLException;

	public List<DoctorMajor> doctorProfile2(String doctor_id)
			throws ClassNotFoundException, SQLException;

	public List<DoctorMajor> doctorProfile3(String doctor_id)
			throws ClassNotFoundException, SQLException;

	public List<Doctor> doctorHistory(Doctor doctor)
			throws ClassNotFoundException, SQLException;

	public List<Doctor> doctorScheduleDate(Doctor doctor)
			throws ClassNotFoundException, SQLException;

	public List<Doctor> doctorScheduleTime(Doctor doctor)
			throws ClassNotFoundException, SQLException;

	public List<Doctor> doctorScheduleId(String doctor_id, String sdate,
			String res_time) throws ClassNotFoundException, SQLException;

	/* 인터넷 예약 end */

	public List<Cheobang_waiting_list> waitinglist(String doctor_id)
			throws ClassNotFoundException, SQLException;

	public Doctormainview doctormaininfo(String jupsoo_id)
			throws ClassNotFoundException, SQLException;

	public List<Seosik> seosik() throws ClassNotFoundException, SQLException;

	public List<Disease> disease() throws ClassNotFoundException, SQLException;

	public List<Medicine> medicine() throws ClassNotFoundException,
			SQLException;

	public List<Seosik> seosiksearch(String seosiksearch);

	public List<Disease> diseasesearch(String diseasesearch);

	public List<Medicine> medisearch(String midisearch);

	public List<Doctormainview> chebang_click(String patientid, String delid);

	public int waitinglist_del(String jupsoo_id) throws ClassNotFoundException, SQLException;;

	public List<CalBean> doctorschedule(String id) throws ClassNotFoundException, SQLException;
	
//입원환자 리스트 
	public List<Wardlist> selectwardlist (String doctor_id) throws ClassNotFoundException, SQLException;
	
	//메인 index 홈페이지에서 최근 입원 환자 일수 업데이트
	public List<Wardlist> selectwardlistall () throws ClassNotFoundException, SQLException;
	
	// 검사실 이동 처방temp테이블에 insert
	public int testmove(String opinion, String jupsoo_id,
			String habitat_detail_id, String geomsa_code_id, String is_ward);
	// radio_waiting_list 테이블에서 jupsoo_id를 비교하여 id에 해당하는 놈 뽑아옴
	public Testmove testmove2(String jupsoo_id);
	// 영상의학대기리스트에 insert
	public int testmove3(String cheobang_temp_id);
	
	public Testmove cheobangidselect(String jupsoo_id);
	// 처방 테이블에 insert
	public int cheobang_insert(String cheobang_temp, String diseasecode);
	
	public int countlist(String doctor_id) throws ClassNotFoundException, SQLException;
		
	public List<CheobangTempInsert> geomsacode_sel(String geomsacode);
	
	public Geomsa_code geomsacodenamesel(String geomsacodename);
	
	public int examineinsert(String cheobang_temp_id,String geomsa_code_id,String fee_id);
	
	public int cheobangcompleInsert( String opinion, String jupsoo_id, String habitat_detail_id,String geomsa_code_id, String is_ward);

	public List<Fee> jusa() throws ClassNotFoundException, SQLException;
	
	public int cheobangcompleInsert(CheobangTempInsert cheobang);
	
	public int jusainsert(String cheobang_temp_id,String fee_id) throws ClassNotFoundException, SQLException;
	
	public int tempinsert(String jupsoo_id,String habitat_detail_id) throws ClassNotFoundException, SQLException;

	public List<Dose> selectdose() throws ClassNotFoundException, SQLException;
	
	public CheobangTempInsert selectcheobang_tempid(String jupsoo_id) throws ClassNotFoundException, SQLException;
	
	public int medidose(String cheobang_temp_id, String dose_id) throws ClassNotFoundException, SQLException;
	
	public int insertmedic(String medicine_id,String cheobang_temp_id,String quantity) throws ClassNotFoundException, SQLException;
	//입원 일수 업데이트
	public int updateward_period(int p,String w_soonap_id);
	//입원 월 최대 일 구하기
	public int maxmonth(int warddate);
	
	//입원 수납 테이블 인서트
	public int wardsoonapinsert(Wardlist wardlist);
	public int wardnosoonapinsert(Wardlist wardlist);
	//입원 히스토리 인서트
	public int dischargeinsert (Wardlist wardlist);
	
	//입원 미수납 삭제
	public int deletew_soonap (Wardlist wardlist);
	//입원 리스트 삭제
	public int delectward_list (Wardlist wardlist);
	
	public int wardsoonaptotalselect(Wardlist wardlist);
	
	public int gagam_sooga(String sooga_name);
	
	public List<Filesview> filesview(String patient_id);
	
	public List<Geomsa_code> examinesel(String cheobang_temp_id) throws ClassNotFoundException, SQLException;

	
	//급여 진찰료 구하기
	public int ok_sg_price1 (String cheobang_id) throws ClassNotFoundException, SQLException;
	
	//급여 약값 구하기
	public int ok_sg_price2 (String cheobang_id) throws ClassNotFoundException, SQLException;
	
	//비급여 진찰료 구하기
	public int no_sg_price1 (String cheobang_id) throws ClassNotFoundException, SQLException;
	
	//처방 아이디로 환자 정보 가져오기
	public String cheobang_all_soonap (String cheobang_id) throws ClassNotFoundException, SQLException;
	//최근접수 날짜 구하기
	public String maxjupsoo_date (String pastcheobang_id ) throws ClassNotFoundException, SQLException;
	
	//초재진 날자 비교
	public Calendar selectcal(int yyyy,int MM ,int dd) throws ClassNotFoundException, SQLException;
	public String selectcal2 (int yyyy,int MM ,int dd) throws ClassNotFoundException, SQLException;

	public List<Calendar> cal_list(String pastcalendar_id, String calendar_id) throws ClassNotFoundException, SQLException;
	
	public int soonapfinal(Soonap soonap) throws ClassNotFoundException, SQLException;
	
	public Soonap is_soonap(String jupsoo_id) throws ClassNotFoundException, SQLException;
	
	public int select_fee (String selectfee) throws ClassNotFoundException, SQLException;
	public int no_soonap_insert (Soonap soonap) throws ClassNotFoundException, SQLException;
	
	public List<String> is_re_check(String sdate, String patient_id) throws ClassNotFoundException, SQLException;
	
	public List<String> disease_Check(String cheobang_id, String disease_id) throws ClassNotFoundException, SQLException;
	public int sanghaeInsert(String injury_date, String jindanseo_jupsoo_id);
	//진단서 Btn클릭시 처방 Table에 인서트 
	
	public Cheobang_All cheobang_select(String cheobang_temp_id);
	
		public int cheobang_temp_Insert1(String opinion, String jupsoo_id,
				String habitat_detail_id,String geomsa_code_id,String fee_id);
		
	
		public int cheobang_Insert(String opinion, String cheobang_temp_id,
				String habitat_detail_id,String geomsa_code_id, String is_ward,String fee_id);
		
		
		//처방Id 뽑아옴
		public Cheobang_All cheobang_id(String jupsoo_id);
		
		public Cheobang_All cheobang_type(String jupsoo_id);
		
		//진단서코드Table에 insert
		public int jindanCode_Insert(String cheobang_id);

		public Jindanseo injury_jindanseo_select(String cheobang_id);
		
		public int injury_jindanseo_Insert(String injury_date, String jindanseo_code_id);
		
		public Jindanseo jindanseo_jupsoo_select(String jupsoo_id);
		
		public String selectjupsoo_date(String patient_id) throws ClassNotFoundException, SQLException;

			//사망진단 시작
		public int jindanseo_code_samang_insert(String cheobang_id);
		
		public Jindanseo injury_jindanseo_samang_select(String cheobang_id);
		
		public Jindanseo jindanseo_jupsoo_select2(String jupsoo_id);
		
		public int injury_jindanseo_samang_Insert(String death_location, String death_date, String jindanseo_code_id);
		
		//사망진단 끝
		
		//탭2 처방 내역 받아오기
		public List<Cheobang_All> cheobang_history(String patient_id);
		
		public List<Cheobang_All> medi_cheobang(String patient_id);
		
		
		
	//
	public List<DiseaseInfo> diseaseinfo ()	throws ClassNotFoundException, SQLException;

	public int cheobang_Insert2(String opinion, String cheobang_temp_id, String jupsoo_id,
			String habitat_detail_id,String geomsa_code_id, String fee_id );

	public void cheobang_temp_Insert1(String opinion, String jupsoo_id,
			String habitat_detail_id, String geomsa_code_id);

	public List<Testmove> cheobang_temp_idsel(String jupsoo_id);

	public int cheobang_Insert2(String opinion, String cheobang_temp_id,
			String jupsoo_id, String habitat_detail_id, String geomsa_code_id);


}
